package com.yiren.manager.service.impl.cost;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yiren.core.exception.MyException;
import com.yiren.core.service.GenericServiceImpl;
import com.yiren.entity.YrCaregiverSalaryMonth;
import com.yiren.manager.repository.cost.YrCaregiverSalaryMonthRepository;
import com.yiren.manager.service.iface.cost.YrCaregiverSalaryMonthService;

@Service
public class YrCaregiverSalaryMonthServiceImpl extends GenericServiceImpl<YrCaregiverSalaryMonth, String> implements YrCaregiverSalaryMonthService{

	@Autowired
	public YrCaregiverSalaryMonthServiceImpl(YrCaregiverSalaryMonthRepository repository) {
		super(repository);
	}

	@Transactional
	public void updateBetch(List<YrCaregiverSalaryMonth> list) throws MyException {
		for(YrCaregiverSalaryMonth entity : list){
			this.repository.save(entity);
		}
	}

}
